#include "listecontact.h"

ListeContact::ListeContact()
{
}
int ListeContact::IndexPriorite()
{
    for (int i = 0; i < count() ; i++)
    {
        if (at(i).getPriorite() == 1)
            return i;
    }
    return 0;
}
void ListeContact::setListeContact(QSqlQuery query)
{

    while(query.next())
    {
        Contact contact(query, 0);
        this->append(contact);
    }
}
